home *** CD-ROM | disk | FTP | other *** search
/ Megahits 5 / Megahits 5 (1994)(GTI - Rhein-Main-Soft)(DE)(Disc 2 of 2)[!].iso / archive / show / supervw_lib_82.lha / superview-lib / Programmers / Example_SVObjects / SVO / svo.h < prev    next >
C/C++ Source or Header  |  1994-09-10  |  3KB  |  100 lines

  1.  
  2.  /* svo.h
  3.     - Include File for SVO Support Routines -
  4.     (c) 1993-94 by Andreas R. Kleinert
  5.     Last changes : 25.02.1994
  6.  */
  7.  
  8. #ifndef SVO_H
  9. #define SVO_H
  10.  
  11. #ifndef GRAPHICS_VIEW_H
  12. #include <graphics/view.h>
  13. #endif /* GRAPHICS_VIEW_H */
  14.  
  15.  
  16. #define BADFLAGS (SPRITES|VP_HIDE|GENLOCK_AUDIO|GENLOCK_VIDEO)
  17. #define FLAGMASK (~BADFLAGS)
  18. #define BADFLAGS_13 (EXTENDED_MODE|SPRITES|VP_HIDE|GENLOCK_AUDIO|GENLOCK_VIDEO)
  19. #define FLAGMASK_13 (~BADFLAGS)
  20.  
  21.  
  22.  /* ********** */
  23.  /* SVO Header */
  24.  /* ********** */
  25.  
  26.  /* File ID Definitions */
  27.  
  28. #define SVO_ID          "SVO Graphics File V1.0"
  29. #define SVO_ID_LEN      22                        /* len = 21 + 0 Byte */
  30.  
  31. struct SVOHeader
  32. {
  33.  UBYTE svo_ID [SVO_ID_LEN];
  34.  
  35.  UBYTE svo_PixelBits;       /* 1 or 8 (16, 24, 32, ...)             */
  36.  UBYTE svo_PixelDepth;      /* number of svo_PixelBits sized Planes */
  37.  
  38.  UBYTE svo_Version;         /* (see below)                          */
  39.  
  40.  ULONG svo_LeftEdge;        /* Screen Dimensions                    */
  41.  ULONG svo_TopEdge;
  42.  ULONG svo_Width;
  43.  ULONG svo_Height;
  44.  
  45.  ULONG svo_Depth;           /* resulting Intuition Screen BitPlanes */
  46.  
  47.  UWORD svo_ViewMode16;      /* OS V1.2+  ScreenMode ID              */
  48.  UWORD svo_BAD_ViewMode32;  /* DO NOT USE (see below)               */
  49.  
  50.  ULONG svo_BytesPerLine;
  51.  
  52.  UBYTE svo_Colors[256][3];  /* if svo_PixelDepth == 1 */
  53.  
  54.  /* ----- added with svo_Version 1 -------------------------------- */
  55.  
  56.  ULONG svo_ViewMode32;      /* OS V2.04+ ScreenMode ID (see below)  */
  57.  
  58.  
  59.  /* ----- header size may grow in the future (check svo_Version) -- */
  60. };
  61.  
  62. #define SVOHEADER_SIZE (sizeof(struct SVOHeader))
  63.  
  64. #define SVO_HEADER_OLDVERSION ((UBYTE) 0)   /* first version   */
  65. #define SVO_HEADER_VERSION    ((UBYTE) 1)   /* current version */
  66.  
  67.  
  68. /* Notes :
  69.  
  70.    (1)
  71.  
  72.    Do not READ the svo_BAD_ViewMode32 value.
  73.    Check for svo_Version > 0 and READ svo_ViewMode32 instead.
  74.    But do WRITE both values (svo_ViewMode32 and svo_BAD_ViewMode32),
  75.    for compatibility reasons.
  76.  
  77.    (2)
  78.  
  79.    For later support of graphic cards there are two possible ways to store
  80.    graphics :
  81.  
  82.     - planar, one full plane following the next,
  83.       with svo_Depth planes like in IFF-ILBM (svo_PixelBits == 1) :
  84.  
  85.        Colors = (1<<svo_PixelBits-1)<<svo_PixelDepth
  86.               = 1<<svo_PixelDepth 
  87.               = 1<<svo_Depth 
  88.  
  89.     - bytewise planar, where each plane consists on
  90.       svo_PixelDepth bytes (svo_PixelBits == 8) :
  91.       
  92.        Colors = (1<<svo_PixelBits-1)<<svo_PixelDepth
  93.               = 1<<svo_Depth
  94.  
  95.        BUT   != 1<<svo_PixelDepth
  96.  
  97. */
  98.  
  99. #endif /* SVO_H */
  100.